home *** CD-ROM | disk | FTP | other *** search
- unit AutomationServer2MainFormU;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
-
- type
- TFrmServer = class(TForm)
- Label1: TLabel;
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- FrmServer: TFrmServer;
-
- implementation
-
- uses
- ComServ, ComObj, AutomationServer2_TLB;
-
- {$R *.DFM}
-
- procedure TFrmServer.FormCreate(Sender: TObject);
- begin
- Application.ShowMainForm := ComServer.StartMode <> smAutomation;
- end;
-
- procedure TFrmServer.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- if Tag <> 0 then
- (TComObject(Tag) as IClock).Quit
- end;
-
- end.
-